package com.jams.goodox.net.services;


import com.jams.goodox.constant.UrlConstants;
import com.jams.goodox.entity.ActiveEwmBean;
import com.jams.goodox.entity.CommentCountBean;
import com.jams.goodox.entity.InfoListResp;
import com.jams.goodox.entity.MessageCommentListBean;
import com.jams.goodox.entity.MessageNoticeNumberBean;
import com.jams.goodox.entity.MessagePrivateListBean;
import com.jams.goodox.entity.PrivateMessageDetail;
import com.jams.goodox.entity.PrivateMessageSend;
import com.jams.goodox.entity.resp.InfoMessageResp;
import com.jams.goodox.net.BaseEntity;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;

/**
 * 消息service
 * Created by jams_zhen on 2016/9/27.
 */

public interface MessageService {
    // 获取通知列表
    @GET(UrlConstants.messageGetNoticeList)
    Call<InfoListResp> getNoticeList(@QueryMap Map<String, String> names);

    //全阅通知
    @PUT(UrlConstants.messageClearNotice)
    Call<BaseEntity> allReadMsg(@Query("classify") String classify,@Query("appType") String appType);

    // 获取未读数
    @GET(UrlConstants.messageNoticeNum)
    Call<MessageNoticeNumberBean> getMessageNoticeNum(@Query("appType") String appType);

    //获取通知未读信息：	1个人通知 2 企业通知
    @GET(UrlConstants.noticeUnRed)
    Call<InfoMessageResp> noticeUnRed(@Query("classify") String classify, @Query("appType") String appType);

    // 获取评论列表
    @GET(UrlConstants.messageCommentList)
    Call<MessageCommentListBean> getMessageCommentList(@QueryMap Map<String, String> names);

    //获取评论未读数
    @GET(UrlConstants.commentUnRed)
    Call<CommentCountBean> commentUnRed();

    // 获取私信列表
    @GET(UrlConstants.messagePriLetterList)
    Call<MessagePrivateListBean> getMessagePriLetterList(@QueryMap Map<String, String> names);

    // 获取私信详情
    @GET(UrlConstants.messagePriLetterDetail)
    Call<PrivateMessageDetail> getMessagePriLetterDetail(@QueryMap Map<String, String> names);


    // 获取私信列表
    @FormUrlEncoded
    @POST(UrlConstants.messageSendPriLetter)
    Call<PrivateMessageSend> sndPriLetter(@FieldMap Map<String, String> names, @Field("msgReason") int msgReason);

    // 获取活动二维码页面详情
    @GET(UrlConstants.getActiveEwm)
    Call<ActiveEwmBean> getActiveEwm(@Path("activityUserId") String activityUserId);

    //取消报名
    @DELETE(UrlConstants.cancelApplySign)
    Call<BaseEntity> cancelApply(@Path("activityUserId") String activityUserId, @QueryMap Map<String, String> names);
}
